home *** CD-ROM | disk | FTP | other *** search
/ Gekikoh Dennoh Club 5 / Gekikoh Dennoh Club Vol. 5 (Japan).7z / Gekikoh Dennoh Club Vol. 5 (Japan) (Track 01).bin / games / dagger / tim.bas < prev    next >
Encoding:
BASIC Source File  |  1993-06-11  |  22.1 KB  |  520 lines

  1. /*üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
  2. /*üüüüüüüü  'éséëéìü|éoéüéÉéàéÆ'ü@éaéÖü@éséüéïéàéìéëüEéìéüéöéôéòéìéÅéöéÅ  üüüüüüüü
  3. /*üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
  4. /*üüüüüüüü  ò╧ÉöÆΦï`
  5. dim int ban(65535),cod(1000),gt(7),mem(119)
  6. dim char gg(7),fg(9),fc(9)
  7. /*----------- âVâXâeâÇ
  8. str  cs[2],kwa[96],pus[96],fname[255]
  9. int  tit,wri,sel,kem,ovr,pic,csr,scr,fra
  10. int  nl,no,ns                                    ,nsb
  11. char nc,nk,nf,ng,nr,vy,vn,gm,bs,kb,np,bc,cn,ct,cy,nvb,hzb,pnb,nkb,ncb,vnb,vyb
  12. dim int pc(9),vo(9),pa(9),fl(9)
  13. /*----------- éoébélè╓îW
  14. char nv,hz,pn,nh
  15. dim int  pcm0(40959),voi0(5119),pad(9),vod(9)
  16. dim char samp(16383)
  17. /*----------- ò╢ÄÜù±Åêù¥
  18. str s0[8],s1[8],s2[8],s3[8],s4[8],s5[8],s6[8],s7[8],ss[256]
  19. str b0[2],b1[2],b2[2],b3[2],b4[2],b5[2],b6[2],b7[2],c0[2],c1[2]
  20. /*----------- ö─ùpò╧Éö
  21. int cx,flg=0,tim,file_0,size
  22. int aa,bb,cc,dd,ee,ff,hh,ii,i,j,k
  23. int kx,ky,tx,ty,xx,yy,bl,br,lb,rb
  24. char st,sb,tr,tb,md,mm
  25. /*üüüüüüüü  âtâ@âCâïô╟é▌ì₧é▌
  26. width 96 : console 0,31,0 : mouse(4) : mouse(2)
  27. for i=0 to b_argc-1 : ss=ss+b_argv(i) : next
  28. if instr(1,ss,".x")=0 then {
  29. fname=right$(ss,len(ss)-instr(1,ss,".X")-1)
  30. } else {
  31. fname=right$(ss,len(ss)-instr(1,ss,".x")-1)
  32. }
  33. if fname="" or fname="/?" or fname="-?" then {
  34.         print"Ägùpû@üFTIM âVâiâèâIâtâ@âCâïû╝"
  35. print : print"èmöFüFâèâ^ü[âôâLü[üñ"
  36. while inkey$(0)<>chr$(13) : endwhile
  37. color 3 : end
  38. }
  39. /*
  40. color 5 :         print"Welcome To The Multi Scenario Novel Wear World!!"
  41. color 6 : print : print"        'Tim-Paper' Version 1.04 ";
  42. color 5 :         print"_1993 / TakemiÑMatsumoto."
  43. color 3 : print : print"                Now_loadingÑÑÑ '";fname;"'"
  44. error off : file_0=fopen(fname,"r") : error on : if file_0=-1 then errors(401)
  45. aa=fseek(file_0,0,2) : fseek(file_0,0,0)       : if 262143<aa then errors(400)
  46. fread(ban,(aa\4)+1,file_0) : fcloseall()       : size=(aa\4)+1
  47. /*----------- âyü[âWÉöâ`âFâbâN
  48. locate 0,4 : print"ò╢Å═âfü[â^é≡É«ù¥Æåé┼é╖üBé╡é╬éτé¡é¿æ╥é┐ë║é│éóüB" : m_stop()
  49. for i=0 to size-1
  50. gg(4)= ban(i) shr 24          : gg(5)=(ban(i) shr 16) and 255
  51. gg(6)=(ban(i) shr  8) and 255 : gg(7)= ban(i)         and 255
  52. if gg(4)=58 then if isalnum(gg(3))<>0 then found_num(4)
  53. if gg(5)=58 then if isalnum(gg(4))<>0 then found_num(5)
  54. if gg(6)=58 then if isalnum(gg(5))<>0 then found_num(6)
  55. if gg(7)=58 then if isalnum(gg(6))<>0 then found_num(7)
  56. slide2(gg,4,gg,0,4) : if cod(999)<>0 then break
  57. next : print
  58. if cod(  0)=0 then errors(0)
  59. /*----------- âRâôâtâBâOâîü[âVâçâôô╟é▌ì₧é▌
  60. s2=chr$(13) : s3=chr$(10) : nl=0
  61. for i=0 to 255
  62. s4=chr$( ban(i) shr 24         ) : s5=chr$((ban(i) shr 16) and 255)
  63. s6=chr$((ban(i) shr  8) and 255) : s7=chr$( ban(i)         and 255)
  64. if b6=chr$(13) and b7=chr$(10) then ss=s0+s1+s2+s3+s4 : found_equal(i*4+2)
  65. if b7=chr$(13) and s0=chr$(10) then ss=s1+s2+s3+s4+s5 : found_equal(i*4+3)
  66. if s0=chr$(13) and s1=chr$(10) then ss=s2+s3+s4+s5+s6 : found_equal(i*4+4)
  67. if s1=chr$(13) and s2=chr$(10) then ss=s3+s4+s5+s6+s7 : found_equal(i*4+5)
  68. b0=b4 : b1=b5 : b2=b6 : b3=b7
  69. b4=s0 : b5=s1 : b6=s2 : b7=s3
  70. s0=s4 : s1=s5 : s2=s6 : s3=s7 : if flg=1 then break
  71. next : print
  72. /*üüüüüüüüüüüüüüüü  Åëè·É▌ÆΦ
  73. /*----------- éoébél
  74. for i=0 to 9 : if pc(i)=0 then continue else get_line(pc(i))
  75. error off : file_0=fopen(ss,"r") : error on
  76. if file_0=-1 then errors(800) : fcloseall() : continue
  77. aa=fseek(file_0,0,2) : fseek(file_0,0,0) : if 16383<aa then errors(804) : aa=16384
  78. fread(samp,aa,file_0) : slide2(samp,0,pcm0,i*16384,16384) : pad(i)=aa
  79. fcloseall() : next
  80. /*
  81. for i=0 to 9 : if vo(i)=0 then continue else get_line(vo(i))
  82. error off : file_0=fopen(ss,"r") : error on
  83. if file_0=-1 then errors(802) : fcloseall() : continue
  84. aa=fseek(file_0,0,2) : fseek(file_0,0,0) : if  2047<aa then errors(806) : aa= 2048
  85. fread(samp,aa,file_0) : slide2(samp,0,voi0,i* 2048, 2048) : vod(i)=aa
  86. fcloseall() : next
  87. /*----------- ëµû╩
  88. gm=3 : nc=3
  89. if scr<>0 then aa=get_chs(scr) : if 47<aa and aa<52 then gm=aa-48 else errors(900)
  90. switch gm
  91. case 0 : if pic=0 then width 64 : break else screen 1,1,1,1 : break
  92. case 1 : if pic=0 then width 64 : break else screen 1,2,1,1 : break
  93. case 2 : if pic=0 then width 64 : break else screen 1,3,1,1 : break
  94. default: if pic=0 then width 96         else screen 2,0,1,1
  95. endswitch
  96. /*
  97. disp_frame() : ng=0
  98. if pic<>0 then {
  99. get_line(pic) : error off : aa=apic_load(ss,0,0) : error on
  100. if aa<>0 then errors(901)
  101. }
  102. /*----------- âpâîâbâg
  103. for i=0 to 3 : if pa(i)=0 then continue else get_line(pa(i))
  104. if strspn(ss,"0123456789")<>len(ss) then errors(902) : continue
  105. if 65535<val(ss) then pa(i)=65535 else pa(i)=val(ss)
  106. switch i
  107. case 0:color[   pa(0)] : break
  108. case 1:color[  ,pa(1)] : break
  109. case 2:color[ ,,pa(2)] : break
  110. case 3:color[,,,pa(3)]
  111. endswitch
  112. next
  113. /*----------- é╗é╠æ╝
  114. if kem<>0 then get_line(kem):kwa=ss         else kwa=chr$(9)+chr$(9)+"üÑ"
  115. if pau<>0 then get_line(pau):pus=ss+chr$(5) else pus=chr$(9)+chr$(9)+"äƒäƒ äƒäƒ äƒäƒ"
  116. if csr<>0 then get_line(csr):cs=left$(ss,2) else cs="ü╦"
  117. mem(30)=3 : mem(60)=3 : mem(90)=3 : cls
  118. /*üüüüüüüüüüüüüüüü  â^âCâgâïëµû╩
  119. while ng<>3 : cls : print : color 3 : key_stop()
  120. nc=3 : ns=0 : nk=0 : nl=0 : nr=0 : vy=0 : vn=0 : nv=0 : hz=4 : pn=3 : nh=0 : ng=3
  121. for i=0 to 9 : fg(i)=0 : fc(i)=0 : next
  122. print"éséëéìü@éoéüéÉéàéÆü@éléüéëéÄü@éléàéÄéòüIüI"
  123. print space$(16);"[C R]  ì┼Åëé⌐éτ"
  124. for i=1 to 3 : bc=nc
  125. print space$(16);"[ ";str$(i);" ] Page=";right$("  "+str$(mem(i*30+3)),3);" ";
  126. color mem(i*30) : print_line(cod(mem(i*30+3)),2)
  127. print : nc=bc : color nc : next
  128. print space$(16);"[ESC]  édéÿéëéö"
  129. cn=4 : ct=csrlin-5 : select()
  130. /*----------- âüâéâèü[âìü[âh
  131. if 0<cy and cy<4 then {
  132. aa=cy*30 : for i=0 to 9 : fg(i)=mem(aa+10+i) : fc(i)=mem(aa+20+i) : next
  133. nc=mem(aa  ) : ns=mem(aa+1) : nk=mem(aa+2) : nl=mem(aa+3) : nr=mem(aa+4)
  134. vy=mem(aa+5) : vn=mem(aa+6) : nv=mem(aa+7) : hz=mem(aa+8) : pn=mem(aa+9)
  135. kx=pos : ky=csrlin : bc=nc : console 0,32,0
  136. ng=4 : for i=0 to 9 : if fg(i)=0 or fl(i)=0 then continue
  137. locate (i\5)*((gm\3)*16+29)+3,(i mod 5)+25 : color fc(i) : print_line(fl(i),2)
  138. next : ng=3
  139. nc=bc : color nc : console 3,21,0 : locate kx,ky
  140. }
  141. if cy=4 then ng=3 else ng=0
  142. /*üüüüüüüüüüüüüüüü  âüâCâôâïü[â`âô
  143. cls
  144. while ng=0 : no=1 : bs=0 : print chr$(9);
  145. mem(0)=nc : mem(1)=ns : mem(2)=nk : mem(3)=nl : mem(4)=nr
  146. mem(5)=vy : mem(6)=vn : mem(7)=nv : mem(8)=hz : mem(9)=pn
  147. for i=0 to 9 : mem(10+i)=fg(i) : mem(20+i)=fc(i) : next
  148. /*----------- û{ò╢ò\Ī
  149. while 1 : s0=chr$(get_chr()) : if bs<>0 then bs=bs-1
  150. if s0=":" and bs=0 then break
  151. if s0="@" and bs=0 then extra(0) : if ng=2 then break else continue
  152. for i=0 to ns : tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : np=(onkey(3) and &H20)
  153. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  154. if nk=1 and (tr<>0 or bl<>0 or br<>0 or np=32) then break
  155. next : print s0;
  156. voice()
  157. endwhile
  158.                         if ng=2        then        continue
  159. s1=   chr$(get_chr()) : if s1=chr$(13) then ng=1 : continue
  160. s1=s1+chr$(get_chr())
  161. nf=(instr(1,"SL__GOTH________F0F1F2F3F4F5F6F7F8F9",strupr(s1))-1)
  162. if nf=-1                             then errors(102) else nf=nf\2
  163. if nf= 1 or (3<nf and nf<8) or 17<nf then errors(102)
  164. if 7<nf then print : gt(0)=nl : key_wait() : print : print chr$(9); : if ng=2 then continue
  165. /*----------- æIæ≡Ä}ò\Ī
  166. if nf<2 or 7<nf then {
  167. for i=0 to 7 : bs=0
  168. nsb=ns : nvb=nv : hzb=hz : pnb=pn : ncb=nc : vnb=vn : vyb=vy : nkb=nk
  169. while 1 : if bs<>0 then bs=bs-1
  170. s0=chr$(get_chr()) : if s0="." and bs=0 then flg=0 : break
  171.                      if s0=":" and bs=0 then flg=1 : break
  172. if bs<>0 or asc(s0)<&H21 then continue
  173. if ((&H7F<asc(s0) and asc(s0)<&HA0) or &HDF<asc(s0)) then bs=2
  174. endwhile : if flg=1 then break
  175. if nf<2 then print chr$(9)+"[ "+str$(i+1)+" ]  ";
  176. while 1 : s0=chr$(get_chr()) : if bs<>0 then bs=bs-1
  177. if (s0=chr$( 9) or s0=" ") and bs=0 then break
  178. if  s0=chr$(13)            and bs=0 then errors(101)
  179. if 7<nf then if fg(nf-8)<>i then continue
  180. if  s0="@"                 and bs=0 then extra(1) : continue
  181. for j=0 to ns : tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : np=(onkey(3) and &H20)
  182. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  183. if nk=1 and (tr<>0 or bl<>0 or br<>0 or np=32) then break
  184. next : print s0; : voice()
  185. endwhile
  186. spc_cut() : gt(i)=get_num()
  187. if     gt(i) =-1 then errors(101)
  188. if cod(gt(i))= 0 then errors(104)
  189. if         nf< 2 then print : print chr$(9);
  190. next : cn=i-1 : ct=csrlin-i
  191. if    i=0          then errors(105)
  192. if    i<2 and 7<nf then errors(100)
  193. if sel<>0 and nf<2 then print_line(sel,3)
  194. }
  195. /*----------- ìsæ«É½ò╩Åêù¥
  196. if nf<2 then select() : if cy=255 then ng=2 : continue else nl=gt(cy)      : continue
  197. if nf=2 then print : ng=1 : if ovr<>0 then print_line(ovr,3) : continue else continue
  198. if nf=3 then print                              : key_wait() : print       : continue
  199. if 7<nf then print : print : gt(0)=gt(fg(nf-8)) : key_wait() : print
  200. endwhile
  201. /*----------- âèâvâîâCüH
  202. poke(&HE80016,0) : for i=0 to 5000 : v_wait(0) : next
  203. color 3 : nc=3 : tx=ng : disp_frame() : ng=tx
  204. endwhile
  205. width 96 : while inkey$(0)<>"" : endwhile
  206. color 3 : end
  207. /*üüüüüüüüüüüüüüüü  æIæ≡
  208. func select()
  209. cy=0 : locate 12,ct+cy : print cs; : sys_pcm(2)
  210. tb=(strig(1) or strig(2))  : msstat(xx,yy,lb,rb)
  211. msarea(0,0,1,1) : mouse(1) : msarea(64,ct*16,255,ct*16+cn*16+15)
  212. while 1
  213. st=(stick(1) or stick(2))
  214. tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : mspos(xx,yy)
  215. dd=((onkey(0) and &HFC)\4)+(onkey(1) and 3)*64
  216. if dd<>0 then {
  217. for i=0 to 7 : if ((dd shr i) and 1)=1 then break
  218. next
  219. if (cn<i and ng<>3) or (2<i and ng=3) then continue
  220. locate 12,ct+cy : print"  ";
  221. if ng=3 then cy=i+1 else cy=i
  222. locate 12,ct+cy : print cs; : break
  223. }
  224. if ng=0 then {
  225. if (onkey(9) and  8)= 8 or (onkey(5) and  4)= 4 then mem_save(1) : continue
  226. if (onkey(9) and 16)=16 or (onkey(5) and  8)= 8 then mem_save(2) : continue
  227. if (onkey(9) and 32)=32 or (onkey(5) and 16)=16 then mem_save(3) : continue
  228. }
  229. if (onkey(0) and  2)= 2 then {
  230. if ng=3 then {
  231. locate 12,ct+cy : print"  "; : cy=4 : locate 12,ct+cy : print cs; : break
  232. } else cy=255 : break
  233. }
  234. if ng=3 and (onkey(3) and 32)=32 then {
  235. locate 12,ct+cy : print"  "; : cy=0 : locate 12,ct+cy : print cs; : break
  236. }
  237. if (tr<>0 and tr<>tb) or (bl<> 0 and bl<>lb) or (br<> 0 and br<>rb) then break
  238. if (st= 8 and st<>sb) and cy<> 0 then locate 12,ct+cy:print"  "; : cy=cy-1 : sys_pcm(0)
  239. if (st= 2 and st<>sb) and cy<>cn then locate 12,ct+cy:print"  "; : cy=cy+1 : sys_pcm(0)
  240. if ky<>yy then locate 12,ct+cy:print"  "; : cy=(yy-(ct*16))\16
  241. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  242. sb=st : tb=tr : ky=yy : lb=bl : rb=br : locate 12,ct+cy : print cs;
  243. endwhile
  244. /*
  245. for i=0 to cn : if i=cy then continue
  246. locate 0,ct+i:print chr$(5);
  247. next
  248. mouse(2) : sys_pcm(1) : key_stop()
  249. while a_stat()=2
  250. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  251. endwhile
  252. locate 0,ct+cn+1 : print : if sel<>0 then print
  253. endfunc
  254. /*üüüüüüüüüüüüüüüü  âüâéâèü[âZü[âu
  255. func mem_save(dd;int)
  256. kx=csrlin : ky=pos : bc=nc : console 31,1,0 : color 3 : poke(&HE80016,0) : sys_pcm(2)
  257. locate  0,31 : print"Save [ ";str$(dd);" ] Page=";str$(mem(dd*30+3));
  258. locate 20,31 : color mem(dd*30) : print_line(cod(mem(dd*30+3)),2)
  259. locate 50,31 : color 3 : print"(éxü^ém)üH";
  260. while 1
  261. if (onkey(2) and  64)= 64 then cls:print"Save O.K.";:slide2(mem,0,mem,dd*120,120) : break
  262. if (onkey(5) and 128)=128 then cls:print"Cancel!";                                : break
  263. endwhile : sys_pcm(1) : for i=0 to 2000 : v_wait(0) : next
  264. cls : console 3,21,0 : locate kx,ky : nc=bc : color nc
  265. endfunc
  266. /*üüüüüüüüüüüüüüüüü@âLü[âXâgâbâv
  267. func key_stop()
  268. while 1
  269. tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : np=(onkey(0) and 2) or (onkey(3) and &h20)
  270. if tr=0 and bl=0 and br=0 and np=0 then break
  271. endwhile
  272. endfunc
  273. /*üüüüüüüüüüüüüüüü  âLü[ôⁿù═æ╥é┐
  274. func key_wait()
  275. tb=(strig(1) or strig(2)) : msstat(xx,yy,lb,rb) : kb=(onkey(3) and &H20)
  276. ct=csrlin : sys_pcm(2)
  277. while 1 : tim=(tim+1) and 31
  278. if tim= 1 then locate 0,ct : print kwa;
  279. if tim=17 then locate 0,ct : print chr$(5);
  280. tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : np=(onkey(3) and &H20)
  281. if (tr<>tb and tr<>0) or (bl=-1 and bl<>lb) or (br=-1 and br<>rb) then break
  282. if  np<>kb and np=&H20                                            then break
  283. if (onkey(0) and  2)= 2 then ng=2 : nf=8 : break
  284. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  285. tb=tr : lb=bl : rb=br : kb=np
  286. endwhile
  287. /*
  288. locate 0,ct : print pus : sys_pcm(1) : key_stop()
  289. while a_stat()=2
  290. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  291. endwhile
  292. if nf<8 then {
  293. spc_cut() : gt(0)=get_num()
  294. if     gt(0) =-1 then errors(101)
  295. if cod(gt(0))= 0 then errors(104)
  296. }
  297. nl=gt(0)
  298. endfunc
  299. /*üüüüüüüüüüüüüüüü  âXâyü[âXüAésé`éaüAébéqâRü[âhï≤æùéΦ
  300. func spc_cut()
  301. while 1 : cc=get_chr() : if cc<>9 and cc<>10 and cc<>13 and cc<>32 then break
  302. endwhile : no=no-1
  303. endfunc
  304. /*üüüüüüüüüüüüüüüü  ÉöÄÜĵô╛
  305. func get_num()
  306. gg(0)=0 : gg(1)=0 : gg(2)=0 : bb=0
  307. s0=chr$(get_chs(cod(nl)+no  )) : s1=chr$(get_chs(cod(nl)+no+1))
  308. s2=chr$(get_chs(cod(nl)+no+2)) : s3=s0+s1+s2
  309. if strupr(s3)="OPN" then gg(0)=0 : gg(1)=0 : gg(2)=0 : bb=3 : return(  0)
  310. if strupr(s3)="END" then gg(0)=9 : gg(1)=9 : gg(2)=9 : bb=3 : return(999)
  311. while 1
  312. cc=get_chr() : if isdigit(cc)<>0 then gg(0)=cc-48 : bb=bb+1 else break
  313. cc=get_chr() : if isdigit(cc)<>0 then gg(1)=cc-48 : bb=bb+1 else break
  314. cc=get_chr() : if isdigit(cc)<>0 then gg(2)=cc-48 : bb=bb+1 else break
  315. endwhile : no=no-1
  316. while isdigit(get_chr())<>0 : endwhile : no=no-1
  317. if bb=0 then cc=-1
  318. if bb=1 then cc=gg(0)
  319. if bb=2 then cc=gg(0)* 10+gg(1)
  320. if bb=3 then cc=gg(0)*100+gg(1)*10+gg(2)
  321. return(cc)
  322. endfunc
  323. /*üüüüüüüüüüüüüüüü  éPò╢ÄÜĵô╛
  324. func get_chr()
  325. aa=(cod(nl)+no)  \  4 : cx=(cod(nl)+no) and 3 : no=no+1
  326. if size-1<aa then errors(103)
  327. return((ban(aa) shr ((3-cx)*8)) and 255)
  328. endfunc
  329. /*üüüüüüüüüüüüüüüü  ÄwÆΦê╩ÆuéPò╢ÄÜĵô╛
  330. func get_chs(bb;int)
  331. aa=         bb   \  4#: cx=(        bb) and 3
  332. return((ban(aa) shr ((3-cx)*8)) and 255)
  333. endfunc
  334. /*üüüüüüüüüüüüüüüü  éPìsò\Ī
  335. func print_line(aa;int,md;int)
  336. bs=0 : nsb=ns : nvb=nv : hzb=hz : pnb=pn : ncb=nc : vnb=vn : vyb=vy : nkb=nk
  337. while 1 : s0=chr$(get_chs(aa)) : aa=aa+1 : if bs<>0 then bs=bs-1
  338. if s0=chr$(13) or (md=2 and bs=0 and ng<>4 and 47<pos) then break
  339. if s0="@" and bs=0 then ii=no : no=aa : extra(md) : aa=aa+bb+1 : continue
  340. if md=2 then {
  341. print s0;
  342. if bs<>0 or asc(s0)<&H21 then continue
  343. if ((&H7F<asc(s0) and asc(s0)<&HA0) or &HDF<asc(s0)) then bs=2
  344. continue
  345. }
  346. for i=0 to ns : tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : np=(onkey(3) and &H20)
  347. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  348. if nk=1 and (tr<>0 or bl<>0 or br<>0 or np=32) then break
  349. next : print s0; : voice()
  350. endwhile
  351. endfunc
  352. /*üüüüüüüüüüüüüüüü  éPìsô╟é▌ì₧é▌
  353. func get_line(aa;int)
  354. ss=""
  355. while 1 : s0=chr$(get_chs(aa)) : if s0=chr$(13) then break
  356. aa=aa+1 : ss=ss+s0 : endwhile
  357. endfunc
  358. /*üüüüüüüüüüüüüüüü  âyü[âWÉöâ|âCâôâgò█æ╢
  359. func found_num(aa;int)
  360. s0=chr$(gg(aa-4)) : s1=chr$(gg(aa-3)) : s2=chr$(gg(aa-2)) : s3=chr$(gg(aa-1))
  361. s0=s0+s1+s2+s3    : s4=chr$(10)+"OPN" : s5=chr$(10)+"END"
  362. if strupr(s0)=s4 then cod(  0)=i*4+aa-3 : return()
  363. if strupr(s0)=s5 then cod(999)=i*4+aa-3 : return()
  364. if isdigit(gg(aa-1))<>0 then bb=   val(chr$(gg(aa-1)))     : cc=2 else return()
  365. if isdigit(gg(aa-2))<>0 then bb=bb+val(chr$(gg(aa-2)))* 10 : cc=3
  366. if isdigit(gg(aa-3))<>0 then bb=bb+val(chr$(gg(aa-3)))*100 : cc=4
  367. if gg(aa-cc)<>10 then return()
  368. cod(bb)=i*4+aa-3 : print".";
  369. endfunc
  370. /*üüüüüüüüüüüüüüüü  Å≤æ╘É▌ÆΦâRâ}âôâhÅêù¥
  371. func found_equal(aa;int)
  372. ss=strupr(ss) : bb=asc(mid$(ss,3,1)) : c0=left$(ss,2) : c1=mid$(ss,4,2)
  373. if ss="TIT=:" then tit=aa : print"T"; : return()
  374. if ss="WRI=:" then wri=aa : print"W"; : return()
  375. if ss="SEL=:" then sel=aa : print"S"; : return()
  376. if ss="KEY=:" then kem=aa : print"K"; : return()
  377. if ss="PAU=:" then pau=aa : print"p"; : return()
  378. if ss="OVR=:" then ovr=aa : print"O"; : return()
  379. if ss="PIC=:" then pic=aa : print"P"; : return()
  380. if ss="CSR=:" then csr=aa : print"C"; : return()
  381. if ss="SCR=:" then scr=aa : print"G"; : return()
  382. if ss="FRA=:" then fra=aa : print"F"; : return()
  383. if c0="PC" and 47<bb and bb<58 and c1="=:" then print"P";chr$(bb);:pc(bb-48)=aa:return()
  384. if c0="VO" and 47<bb and bb<58 and c1="=:" then print"V";chr$(bb);:vo(bb-48)=aa:return()
  385. if c0="PA" and 47<bb and bb<52 and c1="=:" then print"A";chr$(bb);:pa(bb-48)=aa:return()
  386. if c0="FL" and 47<bb and bb<58 and c1="=:" then print"F";chr$(bb);:fl(bb-48)=aa:return()
  387. if left$(ss,4)="OPN:" or left$(ss,2)="0:" then flg=1
  388. endfunc
  389. /*üüüüüüüüüüüüüüüü  ÿgì∞ɼ
  390. func disp_frame()
  391. console 0,32,0 : cls : ng=4
  392. if fra<>0 then aa=get_chs(fra) : if aa=49 then {
  393. color 7 :        locate 1, 0 : print"äí";string$((gm\3)*32+58,"-");"äó";
  394.                  locate 1, 1 : print"äá";string$((gm\3)*32+58," ");"äá";
  395.                  locate 1, 2 : print"äñ";string$((gm\3)*32+58,"-");"äú";
  396.                  locate 1,24 : print"äí";string$((gm\3)*32+58,"-");"äó";
  397. for i=25 to 29 : locate 1, i : print"äá";string$((gm\3)*32+58," ");"äá"; : next
  398.                  locate 1,30 : print"äñ";string$((gm\3)*32+58,"-");"äú"; : color 3
  399. }
  400. if tit<>0 then locate            3,1 : print_line(tit,2)
  401. if wri<>0 then locate (gm\3)*16+32,1 : print_line(wri,2)
  402. console 3,21,0 : color 3 : ng=3
  403. endfunc
  404. /*üüüüüüüüüüüüüüüü  Å≤ï╡É▌ÆΦâRâ}âôâh
  405. func extra(ff;int)
  406. if 1<ff then hh=nl : nl=1000
  407. s0=chr$(get_chr()) : s0=strupr(s0) : dd=asc(s0) : ee=get_num()
  408. if 1<ff                       then nl=hh : no=ii
  409. if bb=0                       then errors(200)
  410. if dd<>67 and dd<>66 and ff=2 then return()
  411. switch dd
  412. /*-----------     -       -       ò╢ÄÜò\Īæ¼ôxò╧ìX
  413. case 83 : ns=ee : break
  414. /*-----------     -       -       êΩÄ₧ÆΓÄ~
  415. case 87
  416. if ff<>0 then errors(202)
  417. if ee=  0 then while a_stat()=2 : endwhile          : break
  418. if ee=900 then nf=8 : gt(0)=nl : print : key_wait() : break
  419. if ee<900 then {
  420. for i=0 to ee*16
  421. v_wait(0) : poke(&HE80016,int(rnd()*(vy*2+1))-vy)
  422. tr=(strig(1) or strig(2)) : msstat(xx,yy,bl,br) : np=(onkey(3) and &H20)
  423. if nk=1 and (tr<>0 or bl<>0 or br<>0 or np=32) then break
  424. next
  425. }
  426. break
  427. /*-----------     -       -       î°ë╩ë╣éoébélì─É╢
  428. case 80 : nh=1
  429. case 86
  430. if bb<2 or 4<gg(1) then gg(1)=4
  431. if bb<3 or 3<gg(2) then gg(2)=3
  432. if dd=86 then nv=gg(0) : hz=gg(1) : pn=gg(2) : break
  433. if pad(gg(0))=0 then break
  434. a_end() : slide2(pcm0,gg(0)*16384,samp,0,16384) : a_play(samp,gg(1),gg(2),pad(gg(0)))
  435. break
  436. /*-----------     -       -       âXâÇü[âXâXâNâìü[âï
  437. case 82
  438. if ff<>0 then errors(202)
  439. file_0=fopen("CON","w")
  440. if gg(0)=0 then fwrites(chr$(&H1B)+"[?4l",file_0) else fwrites(chr$(&H1B)+"[?4h",file_0)
  441. fcloseall()
  442. break
  443. /*-----------     -       -       ô╟é▌ö≥é╬é╡É▌ÆΦ
  444. case 75 : if gg(0)=0 then nk=0 : break else nk=1 : break
  445. /*-----------     -       -       ÉFò╧ìX
  446. case 67 : if ee<16 then color ee:nc=ee : break else color 3:nc=3 : break
  447. /*-----------     -       -       âtâëâOâZâbâg
  448. case 70
  449. if       ff<>0 then errors(202)
  450. if     gg(1)=0 then fg(gg(0))=0 else fg(gg(0))=1
  451. if fl(gg(0))=0 then break
  452. kx=pos : ky=csrlin : console 0,32,0 : locate (gg(0)\5)*((gm\3)*16+29)+3,(gg(0) mod 5)+25
  453. if gg(1)=1 then fc(gg(0))=nc : print_line(fl(gg(0)),3) else print space$((gm\3)*16+28)
  454. console 3,21,0 : locate kx,ky : break
  455. /*-----------     -       -       ëµû╩ÉUô«
  456. case 89
  457. vy=gg(1) : if gg(0)=0 then vn=0:vy=0:poke(&HE80016,0) else vn=1
  458. break
  459. /*-----------     -       -       ëµû╩âzü[âÇâNâèâA
  460. case 72
  461. if ff<>0 then errors(202)
  462. if gg(0)=0 then cls : break else break
  463. /*-----------     -       -       Å≤æ╘û▀é╡
  464. case 66
  465. if ff=0 then errors(203)
  466. if gg(0)=0 then ns=nsb:nv=nvb:hz=hzb:pn=pnb:nk=nkb:nc=ncb:vn=vnb:vy=vyb : color nc
  467. poke(&HE80016,0) : break
  468. default : errors(201)
  469. endswitch
  470. endfunc
  471. /*üüüüüüüüüüüüüüüü  â{âCâX
  472. func voice()
  473. if bs<>0 or asc(s0)<&H21 then return()
  474. if ((&H7F<asc(s0) and asc(s0)<&HA0) or &HDF<asc(s0)) then bs=2
  475. if vod(nv)=0 then return()
  476. if nh=1 and a_stat()=2 then return() else nh=0
  477. a_end() : slide2(voi0,nv*2048,samp,0,2048) : a_play(samp,hz,pn,vod(nv))
  478. endfunc
  479. /*üüüüüüüüüüüüüüüü  âVâXâeâÇë╣
  480. func sys_pcm(mm;int)
  481. if vod(mm)=0 then return()
  482. a_end() : slide2(voi0,mm*2048,samp,0,2048) : a_play(samp,4,3,vod(mm))
  483. endfunc
  484. /*üüüüüüüüüüüüüüüü  âGâëü[üAâÅü[âjâôâOÅêù¥
  485. func errors(dd;int)
  486. switch dd
  487. case   0 : ss="'OPN:'âyü[âWüAûöé═üA'0:'âyü[âWé¬û│éóé▌é╜éóé┼é╖éµ"                 : break
  488. case 100 : ss="âtâëâOò¬è≥âyü[âWé╚é╠é╔üAæIæ≡Äêé¬éQé┬É▌ÆΦé│éΩé─éóé▄é╣é±éµ"         : break
  489. case 101 : ss="é╞é╤ɵâyü[âWÉöé╠ÄwÆΦé¬û│éóé▌é╜éóé┼é╖éµ"                           : break
  490. case 102 : ss="âyü[âWæ«É½é╠ÄwÆΦé¬è╘êßé┴é─éóé▄é╖éµ"                               : break
  491. case 103 : ss="âVâiâèâIâtâ@âCâïé╠ì┼îπé¬é¿é⌐é╡éóé┼é╖éµ(âRâìâôé¬û│éóé╞é⌐üc)"       : break
  492. case 104 : ss="é╞é╤ɵé╠âyü[âWé¬æ╢ì▌é╡é▄é╣é±éµ"                                   : break
  493. case 105 : ss="æIæ≡Äêé¬é╨é╞é┬éαÅæéóé─éáéΦé▄é╣é±éµ"                               : break
  494. case 200 : ss="âRâ}âôâhé╠âpâëâüü[â^ü[é¬éáéΦé▄é╣é±éµ"                             : break
  495. case 201 : ss="æ╢ì▌é╡é╚éóâRâ}âôâhé≡ÄwÆΦé╡é─éóé▄é╖éµ"                             : break
  496. case 202 : ss="é▒é╠âRâ}âôâhé═üAû{ò╢ê╚èOé┼é╠Ägùpé═Åoùêé▄é╣é±éµ"                   : break
  497. case 203 : ss="é▒é╠âRâ}âôâhé═üAû{ò╢é┼é═ÄgùpÅoùêé▄é╣é±éµ"                         : break
  498. case 400 : ss="âVâiâèâIâtâ@âCâïé╠âTâCâYé¬æσé½é╖é¼é┼é╖éµ(256KBé▄é┼)"              : break
  499. case 401 : ss="ÄwÆΦé╠âVâiâèâIâtâ@âCâïé¬î⌐ôûé╜éΦé▄é╣é±éµ"                         : break
  500. case 800 : ss="ÄwÆΦé╠î°ë╩ë╣ùpéoébélâtâ@âCâïé¬æ╢ì▌é╡é╚éóé╠é┼üAÅ╚ù¬é╡é▄é╖éµ"       : break
  501. case 802 : ss="ÄwÆΦé╠â{âCâXùpéoébélâtâ@âCâïé¬æ╢ì▌é╡é╚éóé╠é┼üAÅ╚ù¬é╡é▄é╖éµ"       : break
  502. case 804 : ss="î°ë╩ë╣ùpéoébélâoâbâtâ@é¬éóé┴é╧éóé╚é╠é┼üAôrÆåé▄é┼é╡é⌐û┬éΦé▄é╣é±éµ" : break
  503. case 806 : ss="â{âCâXùpéoébélâoâbâtâ@é¬éóé┴é╧éóé╚é╠é┼üAôrÆåé▄é┼é╡é⌐û┬éΦé▄é╣é±éµ" : break
  504. case 900 : ss="ëµû╩âéü[âhé╠ÄwÆΦé¬é¿é⌐é╡éóé╠é┼üAéXéUü~éRéQìsé╔é╡é─é¿é½é▄é╖éµ"     : break
  505. case 901 : ss="é`éoéhébâtâ@âCâïé¬ô╟é▌ì₧é▀é╚é⌐é┴é╜é╠é┼üAöwîié═ò\Īé╡é▄é╣é±éµ"     : break
  506. case 902 : ss="âJâëü[âRü[âhé╠ÄwÆΦé¬é¿é⌐é╡éóé╠é┼üAé╗é╠é▄é▄é╔é╡é─é¿é½é▄é╖éµ"
  507. endswitch
  508. if 799<dd then {
  509. print : print"Warning!! #";right$("  "+str$(dd),3);" ü¿ ";ss;"üIüI"
  510. print : print"èmöFüFâèâ^ü[âôâLü[üñ"
  511. while inkey$(0)<>chr$(13) : endwhile : return()
  512. }
  513. print : print"Error!! #";right$("  "+str$(dd),3);" ü╦ ";right$("  "+str$(nl),3);" PageüF";ss;"üIüI"
  514. print : print"èmöFüFâèâ^ü[âôâLü[üñ"
  515. while inkey$(0)<>""       : endwhile
  516. while inkey$(0)<>chr$(13) : endwhile
  517. while inkey$(0)<>""       : endwhile
  518. color 3 : end
  519. endfunc
  520.